import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home/Home'
import Classify from '@/pages/Classify/Classify'
import ShopCar from '@/pages/ShopCar/ShopCar'
import User from '@/pages/User/User'
import Details from '@/pages/Details/Details'
import ProDetails from '@/pages/Details/Components/ProDetails'
import PublicPraise from '@/pages/Details/Components/PublicPraise'
import Register from '@/pages/Register/Register'
import Login from '@/pages/Login/Login'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/Classify',
      name: 'Classify',
      component: Classify
    },
    {
      path: '/ShopCar',
      name: 'ShopCar',
      component: ShopCar
    },
    {
      path: '/User',
      name: 'User',
      component: User
    },
    {
      path: '/Details',
      name: 'Details',
      component: Details,
      redirect: '/Details/ProDetails',
      children:[
      	{
      		path: '/Details/ProDetails',
		      component: ProDetails,
      	},
      	{
      		path: '/Details/PublicPraise',
		      component: PublicPraise,
      	},	
      ]
    },
    {
      path: '/Register',
      name: 'Register',
      component: Register
    },
     {
      path: '/Login',
      name: 'Login',
      component: Login
    }
  ]
})
